<?php
session_start();

?>

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>欢迎信息</legend>
</fieldset>

<div style="padding: 20px; background-color: #F2F2F2;">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">欢迎信息</div>
                <div class="layui-card-body">
                    您好！<?php echo $_SESSION["name"] ?>
                </div>
            </div>
        </div>
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">温馨提示：</div>
                <div class="layui-card-body" id="message">

                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

$(document).ready(function () {
    if(isIE()){
        $("#message").append("<h3 style='color:red'>当前为IE浏览器，建议使用谷歌浏览器，体验更佳。</h3>");
    }
    else {
        $("#message").append("<h3 style='color: green'>当前支持该浏览器</h3>");
    }



});
//判断是否为iE浏览器
function isIE() {
    if (!!window.ActiveXObject || "ActiveXObject" in window)
    {
        return true;
    }
    else
    {
        return false;
    }
}

</script>

